@use "../../variables.scss" as *;

// .spg-matrixdynamic__drag-element {
//   padding: calcSize(2);

//   &:hover {
//     background-color: $background;
//   }

//   &:after {
//     content: " ";
//     display: block;
//     height: calcSize(0.5);
//   }
// }

.spg-drag-element__svg {
  width: var(--ctr-data-table-row-drag-area-icon-width, var(--sjs-font-size-x3));
  height: var(--ctr-data-table-row-drag-area-icon-height, var(--sjs-font-size-x3));
  padding-top: var(--ctr-data-table-row-drag-area-padding-top, var(--sjs-spacing-x1));
  padding-inline-end: var(--ctr-data-table-row-drag-area-padding-right, var(--sjs-spacing-x1));
  padding-bottom: var(--ctr-data-table-row-drag-area-padding-bottom, var(--sjs-spacing-x1));
  padding-inline-start: var(--ctr-data-table-row-drag-area-padding-left, var(--sjs-spacing-x1));
  box-sizing: content-box;
  display: block;
  opacity: 0.5;

  use {
    fill: var(--ctr-data-table-row-drag-area-icon-color, var(--sjs-layer-1-foreground-50, #00000080));
  }
}

.spg-matrixdynamic__drag-drop-ghost-position-top,
.spg-matrixdynamic__drag-drop-ghost-position-bottom {
  position: relative;
}

.spg-matrixdynamic__drag-drop-ghost-position-top::after,
.spg-matrixdynamic__drag-drop-ghost-position-bottom::after {
  content: "";
  width: 100%;
  height: calcSize(0.5);
  background-color: var(--sjs-secondary-background-500, #19B394FF);
  position: absolute;
  left: 0;
}

.spg-matrixdynamic__drag-drop-ghost-position-top::after {
  top: 0;
}

.spg-matrixdynamic__drag-drop-ghost-position-bottom::after {
  bottom: 0;
}

.spg-matrixdynamic__placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--ctr-property-grid-background-color, var(--sjs-layer-1-background-500, #ffffffff));
  border: 1px solid var(--ctr-survey-placeholder-border-color, var(--sjs-border-25, #d4d4d4ff));
  border-radius: var(--ctr-data-table-placeholder-corner-radius, var(--sjs-corner-radius-x075));
  box-sizing: border-box;
  padding: var(--ctr-data-table-placeholder-padding-top, var(--sjs-spacing-x6))
    var(--ctr-data-table-placeholder-padding-right, var(--sjs-spacing-x8))
    var(--ctr-data-table-placeholder-padding-bottom, var(--sjs-spacing-x6))
    var(--ctr-data-table-placeholder-padding-left, var(--sjs-spacing-x8));
  gap: var(--ctr-survey-placeholder-gap, var(--lbr-spacing-x05));

  .spg-matrixdynamic__add-btn {
    display: initial;
    margin: 0;
  }
}

.spg-matrixdynamic__placeholder-text {
  @include ctrDefaultFont;
  color: var(--ctr-survey-placeholder-text-color, var(--sjs-layer-1-foreground-50, #00000080));
  text-align: center;
}

.spg-matrixdynamic__add-btn {
  @include ctrDefaultBoldFont;
  display: none;
  appearance: none;
  border: none;
  margin-top: calcSize(0.5);
  background: transparent;
  color: var(--ctr-survey-action-button-text-color-positive, var(--sjs-primary-background-500, #19b394ff));
}

.spg-smiley-icon {
  width: calcSize(3);
  height: calcSize(3);
  margin: calcSize(1);
  border-radius: 100px;
  border: 1px solid var(--ctr-actionbar-button-icon-color, var(--sjs-layer-1-foreground-75, #000000bf));
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: calcSize(4);
  box-sizing: content-box;

  svg {
    width: calcSize(1.5);
    height: calcSize(1.5);
    fill: var(--ctr-actionbar-button-icon-color, var(--sjs-layer-1-foreground-75, #000000bf));
  }
}

.spg-matrixdynamic__dragged-row {
  cursor: grabbing;
  position: absolute;
  z-index: 10000;

  .spg-table__row {
    display: flex;
    align-items: center;
    flex: 1 0 0;
    border-radius: var(--ctr-data-table-row-corner-radius-floating, var(--sjs-corner-radius-x05));
    background: var(--ctr-data-table-row-background-color, var(--sjs-layer-1-background-500, #ffffffff));
    box-shadow:
      var(--ctr-data-table-row-shadow-floating-1-offset-x, 0px)
        var(--ctr-data-table-row-shadow-floating-1-offset-y, 2px)
        var(--ctr-data-table-row-shadow-floating-1-blur, 8px)
        var(--ctr-data-table-row-shadow-floating-1-spread, 0px)
        var(--ctr-data-table-row-shadow-floating-1-color, var(--sjs-special-glow, #004c441a)),
      var(--ctr-data-table-row-shadow-floating-2-offset-x, 0px)
        var(--ctr-data-table-row-shadow-floating-2-offset-y, 16px)
        var(--ctr-data-table-row-shadow-floating-2-blur, 32px)
        var(--ctr-data-table-row-shadow-floating-2-spread, 0px)
        var(--ctr-data-table-row-shadow-floating-2-color, var(--sjs-special-glow, #004c441a));
  }
}
